package org.abox.tools.ant.taskdefs.mks.util;

public class EqualsBuilder {

	private boolean equals = true;

	public boolean isEquals() {
		return equals;
	}

	public EqualsBuilder appendInsensitive(String s1, String s2) {
		equals = equals && (s1 == s2
								|| (s1 != null && s1.equalsIgnoreCase(s2)));
		return this;
	}

	public EqualsBuilder append(int i1, int i2) {
		equals = equals && i1 == i2;
		return this;
	}

	public EqualsBuilder append(String s1, String s2) {
		equals = equals && (s1 == s2
								|| (s1 != null && s1.equals(s2)));
		return null;
	}

	public EqualsBuilder append(boolean b1, boolean b2) {
		equals = equals && (b1 == b2);
		return this;
	}
}
